package com.sxl.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sxl.domain.Userroles;
import com.sxl.service.UserrolesService;
import com.sxl.mapper.UserrolesMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author xue
* @description 针对表【userroles】的数据库操作Service实现
* @createDate 2022-04-18 12:20:36
*/
@Service
public class UserrolesServiceImpl extends ServiceImpl<UserrolesMapper, Userroles>
    implements UserrolesService{
    @Autowired
    private UserrolesMapper userrolesMapper;
    @Override
    public List<Userroles> selectUserrolesById(Integer id) {
        return userrolesMapper.selectUserrolesById(id);
    }

    @Override
    public int deleteUserroles(Integer userId, Integer roleId) {
        return userrolesMapper.deleteUserroles(userId,roleId);
    }

    @Override
    public List<Userroles> selectUserAndUserrolesAndRolesById(Integer id) {
        return userrolesMapper.selectUserAndUserrolesAndRolesById(id);
    }
}




